load("//bazel:mongo_src_rules.bzl", "idl_generator", "mongo_cc_library")
load("//bazel/config:generate_config_header.bzl", "generate_config_header")

package(default_visibility = ["//visibility:public"])

generate_config_header(
    name = "mongo_config_header",
    checks = "mongo_config_header.py",
    extra_definitions = {
        "DEVELOPER_DIR": "$(location //bazel/config:developer_dir)",
    } | select({
        "//bazel/config:use_wiredtiger_enabled": {
            "MONGO_CONFIG_WIREDTIGER_ENABLED": "1",
        },
        "//conditions:default": {},
    }) | select({
        "//bazel/config:build_grpc_enabled": {
            "MONGO_CONFIG_GRPC": "1",
        },
        "//conditions:default": {},
    }) | select({
        "//bazel/config:build_otel_enabled": {
            "MONGO_CONFIG_OTEL": "1",
        },
        "//conditions:default": {},
    }) | select({
        "//bazel/config:tcmalloc_google_enabled": {
            "MONGO_CONFIG_TCMALLOC_GOOGLE": "1",
        },
        "//bazel/config:tcmalloc_gperf_enabled": {
            "MONGO_CONFIG_TCMALLOC_GPERF": "1",
        },
        "//conditions:default": {},
    }) | select({
        "//bazel/config:libunwind_enabled": {
            "MONGO_CONFIG_USE_LIBUNWIND": "1",
        },
        "//conditions:default": {},
    }) | select({
        "//bazel/config:opt_any": {
            "MONGO_CONFIG_OPTIMIZED_BUILD": "1",
        },
        "//conditions:default": {},
    }) | select({
        "//bazel/config:dbg_enabled": {
            "MONGO_CONFIG_DEBUG_BUILD": "1",
        },
        "//conditions:default": {},
    }) | select({
        "//bazel/config:streams_release_build_required_setting": {
            "MONGO_CONFIG_STREAMS": "1",
        },
        "//conditions:default": {},
    }) | select({
        "//bazel/config:posix": {
            "MONGO_CONFIG_HAVE_HEADER_UNISTD_H": "1",
        },
        "//conditions:default": {},
    }) | select({
        "//bazel/config:ssl_enabled": {
            "MONGO_CONFIG_SSL": "1",
        },
        "//conditions:default": {},
    }) | select({
        "@platforms//os:windows": {
            "MONGO_CONFIG_SSL_PROVIDER": "MONGO_CONFIG_SSL_PROVIDER_WINDOWS",
        },
        "@platforms//os:macos": {
            "MONGO_CONFIG_SSL_PROVIDER": "MONGO_CONFIG_SSL_PROVIDER_APPLE",
        },
        "//bazel/config:ssl_enabled_linux": {
            "MONGO_CONFIG_SSL_PROVIDER": "MONGO_CONFIG_SSL_PROVIDER_OPENSSL",
        },
        "//conditions:default": {},
    }) | select({
        "//bazel/config:use_ocsp_stapling_enabled": {
            "MONGO_CONFIG_OCSP_STAPLING_ENABLED": "1",
        },
        "//conditions:default": {},
    }) | select({
        "//bazel/config:use_tracing_profiler_enabled": {
            "MONGO_CONFIG_USE_TRACING_PROFILER": "1",
        },
        "//conditions:default": {},
    }),
    logfile = "mongo_config.log",
    output = "config.h",
    template = "config.h.in",
)

# DO NOT ADD TO THIS UNLESS ABSOLUTELY NECESSARY TO UNBLOCK WORK!!
# This library is added as a global dependency to anything in the src/mongo tree
# and is used as a workaround for any headers added that will require a significant
# refactor to get working (ex. many hours of work). This work needs to be done eventually,
# but if resolving a header cycle is blocking critical work this list can be used to
# defer the refactor until later.
#
# Any header added to this list must reference its own TODO ticket to refactor
# the header graph to not require it to be added globally.
#
# If modifying this list please add the Build team as a reviewer to make sure that
# the header can't be used normally without a large refactor.
#
# This list is an absolute last resort; do not add to this list unless you've put
# significant effort into trying to use a header reference without it.
mongo_cc_library(
    name = "_global_header_bypass",
    hdrs = [
        "_bypass_header_example.h",
    ],
)

mongo_cc_library(
    name = "base",
    srcs = [
        "//src/mongo/base:data_range.cpp",
        "//src/mongo/base:data_range_cursor.cpp",
        "//src/mongo/base:data_type.cpp",
        "//src/mongo/base:data_type_string_data.cpp",
        "//src/mongo/base:data_type_terminated.cpp",
        "//src/mongo/base:dependency_graph.cpp",
        "//src/mongo/base:error_codes_source",
        "//src/mongo/base:error_extra_info.cpp",
        "//src/mongo/base:init.cpp",
        "//src/mongo/base:initializer.cpp",
        "//src/mongo/base:parse_number.cpp",
        "//src/mongo/base:shim.cpp",
        "//src/mongo/base:status.cpp",
        "//src/mongo/base:string_data.cpp",
        "//src/mongo/base:string_data_comparator.cpp",
        "//src/mongo/base:validate_locale.cpp",
        "//src/mongo/bson:bson_comparator_interface_base.cpp",
        "//src/mongo/bson:bson_depth.cpp",
        "//src/mongo/bson:bson_utf8.cpp",
        "//src/mongo/bson:bsonelement.cpp",
        "//src/mongo/bson:bsonelementvalue.cpp",
        "//src/mongo/bson:bsonmisc.cpp",
        "//src/mongo/bson:bsonobj.cpp",
        "//src/mongo/bson:bsonobjbuilder.cpp",
        "//src/mongo/bson:bsontypes.cpp",
        "//src/mongo/bson:json.cpp",
        "//src/mongo/bson:oid.cpp",
        "//src/mongo/bson:simple_bsonelement_comparator.cpp",
        "//src/mongo/bson:simple_bsonobj_comparator.cpp",
        "//src/mongo/bson:timestamp.cpp",
        "//src/mongo/bson/util:builder.cpp",
        "//src/mongo/logv2:attributes.cpp",
        "//src/mongo/logv2:bson_formatter.cpp",
        "//src/mongo/logv2:console.cpp",
        "//src/mongo/logv2:file_rotate_sink.cpp",
        "//src/mongo/logv2:json_formatter.cpp",
        "//src/mongo/logv2:log_component.cpp",
        "//src/mongo/logv2:log_component_settings.cpp",
        "//src/mongo/logv2:log_detail.cpp",
        "//src/mongo/logv2:log_domain.cpp",
        "//src/mongo/logv2:log_domain_global.cpp",
        "//src/mongo/logv2:log_domain_internal.cpp",
        "//src/mongo/logv2:log_manager.cpp",
        "//src/mongo/logv2:log_service.cpp",
        "//src/mongo/logv2:log_severity.cpp",
        "//src/mongo/logv2:log_tag.cpp",
        "//src/mongo/logv2:log_util.cpp",
        "//src/mongo/logv2:plain_formatter.cpp",
        "//src/mongo/logv2:ramlog.cpp",
        "//src/mongo/logv2:redaction.cpp",
        "//src/mongo/logv2:shared_access_fstream.cpp",
        "//src/mongo/logv2:text_formatter.cpp",
        "//src/mongo/platform:decimal128.cpp",
        "//src/mongo/platform:int128.cpp",
        "//src/mongo/platform:process_id.cpp",
        "//src/mongo/platform:random.cpp",
        "//src/mongo/platform:rwmutex.cpp",
        "//src/mongo/platform:shared_library.cpp",
        "//src/mongo/platform:stack_locator.cpp",
        "//src/mongo/platform:strcasestr.cpp",
        "//src/mongo/platform:strnlen.cpp",
        "//src/mongo/platform:waitable_atomic.cpp",
        "//src/mongo/util:allocator.cpp",
        "//src/mongo/util:assert_util.cpp",
        "//src/mongo/util:base64.cpp",
        "//src/mongo/util:boost_assert_impl.cpp",
        "//src/mongo/util:chunked_memory_aggregator.cpp",
        "//src/mongo/util:concurrent_memory_aggregator.cpp",
        "//src/mongo/util:duration.cpp",
        "//src/mongo/util:errno_util.cpp",
        "//src/mongo/util:exception_filter_win32.cpp",
        "//src/mongo/util:exit.cpp",
        "//src/mongo/util:file.cpp",
        "//src/mongo/util:hex.cpp",
        "//src/mongo/util:itoa.cpp",
        "//src/mongo/util:platform_init.cpp",
        "//src/mongo/util:quick_exit.cpp",
        "//src/mongo/util:shared_buffer_fragment_builder.cpp",
        "//src/mongo/util:shell_exec.cpp",
        "//src/mongo/util:signal_handlers_synchronous.cpp",
        "//src/mongo/util:stacktrace.cpp",
        "//src/mongo/util:stacktrace_somap.cpp",
        "//src/mongo/util:stacktrace_threads.cpp",
        "//src/mongo/util:str.cpp",
        "//src/mongo/util:str_escape.cpp",
        "//src/mongo/util:system_clock_source.cpp",
        "//src/mongo/util:system_tick_source.cpp",
        "//src/mongo/util:testing_proctor.cpp",
        "//src/mongo/util:text.cpp",
        "//src/mongo/util:thread_safety_context.cpp",
        "//src/mongo/util:thread_util.cpp",
        "//src/mongo/util:time_support.cpp",
        "//src/mongo/util:timer.cpp",
        "//src/mongo/util:uuid.cpp",
        "//src/mongo/util:version.cpp",
        "//src/mongo/util/concurrency:idle_thread_block.cpp",
        "//src/mongo/util/concurrency:thread_name.cpp",
    ] + select({
        "//bazel/config:posix": ["//src/mongo/util:stacktrace_posix.cpp"],
        "@platforms//os:windows": ["//src/mongo/util:stacktrace_windows.cpp"],
        "//conditions:default": [],
    }) + select({
        "//bazel/config:posix": ["//src/mongo/platform:shared_library_posix.cpp"],
        "@platforms//os:windows": ["//src/mongo/platform:shared_library_windows.cpp"],
        "//conditions:default": [],
    }) + select({
        "@platforms//os:linux": ["//src/mongo/platform:stack_locator_linux.cpp"],
        "@platforms//os:macos": ["//src/mongo/platform:stack_locator_osx.cpp"],
        "@platforms//os:windows": ["//src/mongo/platform:stack_locator_windows.cpp"],
        "//conditions:default": [],
    }),
    hdrs = [
        "//src/mongo/base:checked_cast.h",
        "//src/mongo/base:clonable_ptr.h",
        "//src/mongo/base:compare_numbers.h",
        "//src/mongo/base:counter.h",
        "//src/mongo/base:data_cursor.h",
        "//src/mongo/base:data_range.h",
        "//src/mongo/base:data_range_cursor.h",
        "//src/mongo/base:data_type.h",
        "//src/mongo/base:data_type_endian.h",
        "//src/mongo/base:data_type_string_data.h",
        "//src/mongo/base:data_type_terminated.h",
        "//src/mongo/base:data_view.h",
        "//src/mongo/base:dependency_graph.h",
        "//src/mongo/base:encoded_value_storage.h",
        "//src/mongo/base:error_codes_header",
        "//src/mongo/base:error_extra_info.h",
        "//src/mongo/base:init.h",
        "//src/mongo/base:initializer.h",
        "//src/mongo/base:parse_number.h",
        "//src/mongo/base:secure_allocator.h",
        "//src/mongo/base:shim.h",
        "//src/mongo/base:static_assert.h",
        "//src/mongo/base:status.h",
        "//src/mongo/base:status_with.h",
        "//src/mongo/base:string_data.h",
        "//src/mongo/base:string_data_comparator.h",
        "//src/mongo/bson:bson_comparator_interface_base.h",
        "//src/mongo/bson:bson_depth.h",
        "//src/mongo/bson:bson_field.h",
        "//src/mongo/bson:bson_utf8.h",
        "//src/mongo/bson:bsonelement.h",
        "//src/mongo/bson:bsonelement_comparator_interface.h",
        "//src/mongo/bson:bsonelementvalue.h",
        "//src/mongo/bson:bsonmisc.h",
        "//src/mongo/bson:bsonobj.h",
        "//src/mongo/bson:bsonobj_comparator_interface.h",
        "//src/mongo/bson:bsonobjbuilder.h",
        "//src/mongo/bson:bsontypes.h",
        "//src/mongo/bson:bsontypes_util.h",
        "//src/mongo/bson:generator_extended_canonical_2_0_0.h",
        "//src/mongo/bson:generator_extended_relaxed_2_0_0.h",
        "//src/mongo/bson:generator_legacy_strict.h",
        "//src/mongo/bson:json.h",
        "//src/mongo/bson:oid.h",
        "//src/mongo/bson:ordering.h",
        "//src/mongo/bson:simple_bsonelement_comparator.h",
        "//src/mongo/bson:simple_bsonobj_comparator.h",
        "//src/mongo/bson:timestamp.h",
        "//src/mongo/bson/util:bsonobj_traversal.h",
        "//src/mongo/bson/util:builder.h",
        "//src/mongo/bson/util:builder_fwd.h",
        "//src/mongo/logv2:attribute_storage.h",
        "//src/mongo/logv2:attributes.h",
        "//src/mongo/logv2:bson_formatter.h",
        "//src/mongo/logv2:component_settings_filter.h",
        "//src/mongo/logv2:composite_backend.h",
        "//src/mongo/logv2:console.h",
        "//src/mongo/logv2:constants.h",
        "//src/mongo/logv2:domain_filter.h",
        "//src/mongo/logv2:file_rotate_sink.h",
        "//src/mongo/logv2:json_formatter.h",
        "//src/mongo/logv2:log.h",
        "//src/mongo/logv2:log_attr.h",
        "//src/mongo/logv2:log_component.h",
        "//src/mongo/logv2:log_component_settings.h",
        "//src/mongo/logv2:log_debug.h",
        "//src/mongo/logv2:log_detail.h",
        "//src/mongo/logv2:log_domain.h",
        "//src/mongo/logv2:log_domain_global.h",
        "//src/mongo/logv2:log_domain_internal.h",
        "//src/mongo/logv2:log_format.h",
        "//src/mongo/logv2:log_manager.h",
        "//src/mongo/logv2:log_options.h",
        "//src/mongo/logv2:log_service.h",
        "//src/mongo/logv2:log_severity.h",
        "//src/mongo/logv2:log_source.h",
        "//src/mongo/logv2:log_tag.h",
        "//src/mongo/logv2:log_truncation.h",
        "//src/mongo/logv2:log_util.h",
        "//src/mongo/logv2:plain_formatter.h",
        "//src/mongo/logv2:ramlog.h",
        "//src/mongo/logv2:ramlog_sink.h",
        "//src/mongo/logv2:redaction.h",
        "//src/mongo/logv2:shared_access_fstream.h",
        "//src/mongo/logv2:tagged_severity_filter.h",
        "//src/mongo/logv2:text_formatter.h",
        "//src/mongo/logv2:uassert_sink.h",
        "//src/mongo/platform:atomic.h",
        "//src/mongo/platform:atomic_word.h",
        "//src/mongo/platform:bits.h",
        "//src/mongo/platform:compiler.h",
        "//src/mongo/platform:decimal128.h",
        "//src/mongo/platform:endian.h",
        "//src/mongo/platform:int128.h",
        "//src/mongo/platform:overflow_arithmetic.h",
        "//src/mongo/platform:process_id.h",
        "//src/mongo/platform:random.h",
        "//src/mongo/platform:rwmutex.h",
        "//src/mongo/platform:shared_library.h",
        "//src/mongo/platform:source_location.h",
        "//src/mongo/platform:stack_locator.h",
        "//src/mongo/platform:stack_locator_pthread_getattr_np.cpp",
        "//src/mongo/platform:strcasestr.h",
        "//src/mongo/platform:strnlen.h",
        "//src/mongo/platform:waitable_atomic.h",
        "//src/mongo/unittest:stringify.h",
        "//src/mongo/util:aligned.h",
        "//src/mongo/util:allocator.h",
        "//src/mongo/util:assert_util.h",
        "//src/mongo/util:assert_util_core.h",
        "//src/mongo/util:base64.h",
        "//src/mongo/util:bufreader.h",
        "//src/mongo/util:chunked_memory_aggregator.h",
        "//src/mongo/util:clock_source.h",
        "//src/mongo/util:concurrent_memory_aggregator.h",
        "//src/mongo/util:ctype.h",
        "//src/mongo/util:debug_util.h",
        "//src/mongo/util:decimal_counter.h",
        "//src/mongo/util:decorable.h",
        "//src/mongo/util:duration.h",
        "//src/mongo/util:dynamic_catch.h",
        "//src/mongo/util:errno_util.h",
        "//src/mongo/util:exception_filter_win32.h",
        "//src/mongo/util:exit.h",
        "//src/mongo/util:exit_code.h",
        "//src/mongo/util:file.h",
        "//src/mongo/util:functional.h",
        "//src/mongo/util:future.h",
        "//src/mongo/util:future_impl.h",
        "//src/mongo/util:hex.h",
        "//src/mongo/util:hierarchical_acquisition.h",
        "//src/mongo/util:interruptible.h",
        "//src/mongo/util:intrusive_counter.h",
        "//src/mongo/util:itoa.h",
        "//src/mongo/util:lockable_adapter.h",
        "//src/mongo/util:memory_usage_tracker.h",
        "//src/mongo/util:murmur3.h",
        "//src/mongo/util:optional_util.h",
        "//src/mongo/util:out_of_line_executor.h",
        "//src/mongo/util:quick_exit.h",
        "//src/mongo/util:registry_list.h",
        "//src/mongo/util:scopeguard.h",
        "//src/mongo/util:shared_buffer.h",
        "//src/mongo/util:shared_buffer_fragment.h",
        "//src/mongo/util:shell_exec.h",
        "//src/mongo/util:signal_handlers_synchronous.h",
        "//src/mongo/util:stacktrace.h",
        "//src/mongo/util:stacktrace_somap.h",
        "//src/mongo/util:stacktrace_windows.h",
        "//src/mongo/util:static_immortal.h",
        "//src/mongo/util:str.h",
        "//src/mongo/util:str_basic.h",
        "//src/mongo/util:str_escape.h",
        "//src/mongo/util:string_map.h",
        "//src/mongo/util:synchronized_value.h",
        "//src/mongo/util:system_clock_source.h",
        "//src/mongo/util:system_tick_source.h",
        "//src/mongo/util:testing_proctor.h",
        "//src/mongo/util:text.h",
        "//src/mongo/util:thread_safety_context.h",
        "//src/mongo/util:thread_util.h",
        "//src/mongo/util:tick_source.h",
        "//src/mongo/util:time_support.h",
        "//src/mongo/util:timer.h",
        "//src/mongo/util:uuid.h",
        "//src/mongo/util:version.h",
        "//src/mongo/util:versioned_value.h",
        "//src/mongo/util:waitable.h",
        "//src/mongo/util/concurrency:idle_thread_block.h",
        "//src/mongo/util/concurrency:thread_name.h",
        "//src/mongo/util/concurrency:with_lock.h",
        "//src/mongo/util/tracking:allocator.h",
    ],
    linkopts = select({
        "//bazel/config:ssl_enabled_linux": ["-lcrypto"],
        "//conditions:default": [],
    }) + select({
        "//bazel/config:posix": ["-ldl"],
        "//conditions:default": [],
    }),
    local_defines = select({
        "//bazel/config:gcov_enabled": ["MONGO_GCOV"],
        "//conditions:default": [],
    }) + select({
        "//bazel/config:pgo_profile_enabled": ["MONGO_PGO_PROFILE"],
        "//conditions:default": [],
    }),
    deps = [
        "//src/mongo/stdx",
        "//src/mongo/util:boost_assert_shim",
        "//src/mongo/util:debugger",
        "//src/third_party/IntelRDFPMathLib20U1:intel_decimal128",
        "//src/third_party/abseil-cpp:absl_city",
        "//src/third_party/abseil-cpp:absl_hash",
        "//src/third_party/abseil-cpp:absl_int128",
        "//src/third_party/abseil-cpp:absl_low_level_hash",
        "//src/third_party/abseil-cpp:absl_raw_hash_set",
        "//src/third_party/boost:boost_filesystem",
        "//src/third_party/boost:boost_iostreams",
        "//src/third_party/boost:boost_log",
        "//src/third_party/boost:boost_program_options",
    ],
)

filegroup(
    name = "core_headers",
    srcs = [
        "//src/mongo/base:data_type_validated.h",
        "//src/mongo/bson:bson_validate.h",
        "//src/mongo/bson:bson_validate_gen",
        "//src/mongo/bson:bsonelement_comparator.h",
        "//src/mongo/bson/mutable:const_element.h",
        "//src/mongo/bson/mutable:document.h",
        "//src/mongo/client:authenticate.h",
        "//src/mongo/client:client_api_version_parameters_gen",
        "//src/mongo/client:constants.h",
        "//src/mongo/client:dbclient_base.h",
        "//src/mongo/client:dbclient_cursor.h",
        "//src/mongo/client:index_spec.h",
        "//src/mongo/client:internal_auth.h",
        "//src/mongo/client:mongo_uri.h",
        "//src/mongo/client:read_preference.h",
        "//src/mongo/client:read_preference_gen",
        "//src/mongo/client:read_preference_validators.h",
        "//src/mongo/client:sasl_client_session.h",
        "//src/mongo/crypto:aead_encryption.h",
        "//src/mongo/crypto:encryption_fields_gen",
        "//src/mongo/crypto:encryption_fields_validation.h",
        "//src/mongo/crypto:fle_crypto_predicate.h",
        "//src/mongo/crypto:fle_crypto_types.h",
        "//src/mongo/crypto:fle_data_frames.h",
        "//src/mongo/crypto:fle_fields_util.h",
        "//src/mongo/crypto:fle_tokens.h",
        "//src/mongo/crypto:sha1_block.h",
        "//src/mongo/crypto:symmetric_crypto.h",
        "//src/mongo/crypto:symmetric_key.h",
        "//src/mongo/db:aggregated_index_usage_tracker.h",
        "//src/mongo/db:api_parameters.h",
        "//src/mongo/db:api_parameters_gen",
        "//src/mongo/db:collection_index_usage_tracker.h",
        "//src/mongo/db:collection_type.h",
        "//src/mongo/db:commands.h",
        "//src/mongo/db:dbmessage.h",
        "//src/mongo/db:feature_compatibility_version_document_gen",
        "//src/mongo/db:feature_compatibility_version_parser.h",
        "//src/mongo/db:feature_flag.h",
        "//src/mongo/db:index_names.h",
        "//src/mongo/db:json.h",
        "//src/mongo/db:keypattern.h",
        "//src/mongo/db:list_collections_gen",
        "//src/mongo/db:namespace_spec_gen",
        "//src/mongo/db:read_concern_support_result.h",
        "//src/mongo/db:request_execution_context.h",
        "//src/mongo/db:resource_yielder.h",
        "//src/mongo/db:shard_id.h",
        "//src/mongo/db:transaction_resources.h",
        "//src/mongo/db:update_index_data.h",
        "//src/mongo/db:write_concern.h",
        "//src/mongo/db:write_concern_gen",
        "//src/mongo/db:yieldable.h",
        "//src/mongo/db/auth:authorization_manager.h",
        "//src/mongo/db/auth:authorization_router.h",
        "//src/mongo/db/auth:builtin_roles.h",
        "//src/mongo/db/auth:ldap_cumulative_operation_stats.h",
        "//src/mongo/db/auth:ldap_operation_stats.h",
        "//src/mongo/db/auth:privilege_format.h",
        "//src/mongo/db/auth:restriction.h",
        "//src/mongo/db/auth:restriction_set.h",
        "//src/mongo/db/auth:role_name_or_string.h",
        "//src/mongo/db/auth:user.h",
        "//src/mongo/db/auth:user_acquisition_stats.h",
        "//src/mongo/db/auth:user_cache_access_stats.h",
        "//src/mongo/db/auth:user_management_commands_parser_gen",
        "//src/mongo/db/catalog:collection.h",
        "//src/mongo/db/catalog:collection_operation_source.h",
        "//src/mongo/db/catalog:collection_options.h",
        "//src/mongo/db/catalog:collection_options_gen",
        "//src/mongo/db/catalog:collection_options_validation.h",
        "//src/mongo/db/catalog:index_catalog.h",
        "//src/mongo/db/catalog:index_catalog_entry.h",
        "//src/mongo/db/catalog/util:partitioned.h",
        "//src/mongo/db/collection_crud:capped_visibility.h",
        "//src/mongo/db/commands:create_gen",
        "//src/mongo/db/commands:feature_compatibility_version.h",
        "//src/mongo/db/commands:fle2_cleanup_gen",
        "//src/mongo/db/commands:list_databases_gen",
        "//src/mongo/db/commands:server_status_metric.h",
        "//src/mongo/db/commands:set_feature_compatibility_version_gen",
        "//src/mongo/db/commands:test_commands_enabled.h",
        "//src/mongo/db/concurrency:d_concurrency.h",
        "//src/mongo/db/exec:exec_shard_filter_policy.h",
        "//src/mongo/db/exec:shard_filterer.h",
        "//src/mongo/db/exec:working_set.h",
        "//src/mongo/db/exec:working_set_common.h",
        "//src/mongo/db/exec/document_value:document_comparator.h",
        "//src/mongo/db/exec/document_value:value_comparator.h",
        "//src/mongo/db/exec/sbe/values:bson.h",
        "//src/mongo/db/exec/sbe/values:key_string_entry.h",
        "//src/mongo/db/exec/sbe/values:value.h",
        "//src/mongo/db/fts:fts_basic_phrase_matcher.h",
        "//src/mongo/db/fts:fts_language.h",
        "//src/mongo/db/fts:fts_matcher.h",
        "//src/mongo/db/fts:fts_phrase_matcher.h",
        "//src/mongo/db/fts:fts_query_impl.h",
        "//src/mongo/db/fts:fts_spec.h",
        "//src/mongo/db/fts:fts_tokenizer.h",
        "//src/mongo/db/fts:fts_unicode_phrase_matcher.h",
        "//src/mongo/db/fts:stemmer.h",
        "//src/mongo/db/fts:stop_words.h",
        "//src/mongo/db/fts:tokenizer.h",
        "//src/mongo/db/fts/unicode:codepoints.h",
        "//src/mongo/db/index:index_descriptor.h",
        "//src/mongo/db/index:index_descriptor_fwd.h",
        "//src/mongo/db/matcher:expression.h",
        "//src/mongo/db/matcher:expression_leaf.h",
        "//src/mongo/db/matcher:expression_parser.h",
        "//src/mongo/db/matcher:expression_path.h",
        "//src/mongo/db/matcher:expression_text_base.h",
        "//src/mongo/db/matcher:expression_tree.h",
        "//src/mongo/db/matcher:expression_type.h",
        "//src/mongo/db/matcher:expression_visitor.h",
        "//src/mongo/db/matcher:expression_where_base.h",
        "//src/mongo/db/matcher:expression_with_placeholder.h",
        "//src/mongo/db/matcher:extensions_callback.h",
        "//src/mongo/db/matcher:extensions_callback_noop.h",
        "//src/mongo/db/matcher:in_list_data.h",
        "//src/mongo/db/matcher:match_details.h",
        "//src/mongo/db/matcher:matchable.h",
        "//src/mongo/db/matcher:matcher_type_set.h",
        "//src/mongo/db/matcher:path.h",
        "//src/mongo/db/matcher/schema:encrypt_schema_gen",
        "//src/mongo/db/matcher/schema:encrypt_schema_types.h",
        "//src/mongo/db/matcher/schema:expression_internal_schema_allowed_properties.h",
        "//src/mongo/db/matcher/schema:json_pointer.h",
        "//src/mongo/db/pipeline:accumulator_percentile_enum_gen",
        "//src/mongo/db/pipeline:change_stream_pre_and_post_images_options_gen",
        "//src/mongo/db/pipeline:dependencies.h",
        "//src/mongo/db/pipeline:document_path_support.h",
        "//src/mongo/db/pipeline:document_source_change_stream_gen",
        "//src/mongo/db/pipeline:document_source_merge_gen",
        "//src/mongo/db/pipeline:document_source_out_gen",
        "//src/mongo/db/pipeline:expression.h",
        "//src/mongo/db/pipeline:expression_context.h",
        "//src/mongo/db/pipeline:expression_visitor.h",
        "//src/mongo/db/pipeline:expression_walker.h",
        "//src/mongo/db/pipeline:javascript_execution.h",
        "//src/mongo/db/pipeline:lite_parsed_document_source.h",
        "//src/mongo/db/pipeline:monotonic_expression.h",
        "//src/mongo/db/pipeline:percentile_algo.h",
        "//src/mongo/db/pipeline:percentile_algo_accurate.h",
        "//src/mongo/db/pipeline:percentile_algo_continuous.h",
        "//src/mongo/db/pipeline:percentile_algo_discrete.h",
        "//src/mongo/db/pipeline:resume_token.h",
        "//src/mongo/db/pipeline:sharded_agg_helpers_targeting_policy.h",
        "//src/mongo/db/pipeline:storage_stats_spec_gen",
        "//src/mongo/db/pipeline:variables.h",
        "//src/mongo/db/pipeline/process_interface:mongo_process_interface.h",
        "//src/mongo/db/query:allowed_contexts.h",
        "//src/mongo/db/query:bson_typemask.h",
        "//src/mongo/db/query:distinct_command_gen",
        "//src/mongo/db/query:explain_version_validator.h",
        "//src/mongo/db/query:find_command.h",
        "//src/mongo/db/query:find_command_gen",
        "//src/mongo/db/query:hint_parser.h",
        "//src/mongo/db/query:index_bounds.h",
        "//src/mongo/db/query:index_hint.h",
        "//src/mongo/db/query:interval.h",
        "//src/mongo/db/query:lru_key_value.h",
        "//src/mongo/db/query:partitioned_cache.h",
        "//src/mongo/db/query:query_feature_flags_gen",
        "//src/mongo/db/query:query_knob_configuration.h",
        "//src/mongo/db/query:query_knob_expressions.h",
        "//src/mongo/db/query:query_knobs_gen",
        "//src/mongo/db/query:sort_pattern.h",
        "//src/mongo/db/query:tailable_mode.h",
        "//src/mongo/db/query:tailable_mode_gen",
        "//src/mongo/db/query/client_cursor:generic_cursor.h",
        "//src/mongo/db/query/client_cursor:generic_cursor_gen",
        "//src/mongo/db/query/collation:collator_factory_interface.h",
        "//src/mongo/db/query/plan_cache:sbe_plan_cache_on_parameter_change.h",
        "//src/mongo/db/query/query_settings:index_hints_serialization.h",
        "//src/mongo/db/query/query_settings:query_framework_serialization.h",
        "//src/mongo/db/query/query_settings:query_settings_comment.h",
        "//src/mongo/db/query/query_stats:query_stats_on_parameter_change.h",
        "//src/mongo/db/query/util:deferred.h",
        "//src/mongo/db/query/util:make_data_structure.h",
        "//src/mongo/db/query/util:memory_util.h",
        "//src/mongo/db/query/util:named_enum.h",
        "//src/mongo/db/query/write_ops:single_write_result_gen",
        "//src/mongo/db/query/write_ops:update_result.h",
        "//src/mongo/db/query/write_ops:write_ops.h",
        "//src/mongo/db/query/write_ops:write_ops_exec.h",
        "//src/mongo/db/query/write_ops:write_ops_exec_util.h",
        "//src/mongo/db/query/write_ops:write_ops_gen",
        "//src/mongo/db/query/write_ops:write_ops_parsers.h",
        "//src/mongo/db/repl:apply_ops_gen",
        "//src/mongo/db/repl:member_data.h",
        "//src/mongo/db/repl:member_state.h",
        "//src/mongo/db/repl:oplog.h",
        "//src/mongo/db/repl:oplog_constraint_violation_logger.h",
        "//src/mongo/db/repl:oplog_entry.h",
        "//src/mongo/db/repl:oplog_entry_or_grouped_inserts.h",
        "//src/mongo/db/repl:oplog_entry_serialization.h",
        "//src/mongo/db/repl:repl_client_info.h",
        "//src/mongo/db/repl:repl_server_parameters_gen",
        "//src/mongo/db/repl:repl_set_heartbeat_response.h",
        "//src/mongo/db/repl:repl_settings.h",
        "//src/mongo/db/repl:replication_coordinator.h",
        "//src/mongo/db/repl:replication_coordinator_fwd.h",
        "//src/mongo/db/repl:split_prepare_session_manager.h",
        "//src/mongo/db/repl:sync_source_selector.h",
        "//src/mongo/db/s:collection_metadata.h",
        "//src/mongo/db/s:range_arithmetic.h",
        "//src/mongo/db/s:scoped_collection_metadata.h",
        "//src/mongo/db/session:internal_session_pool.h",
        "//src/mongo/db/session:logical_session_cache_gen",
        "//src/mongo/db/storage:backup_block.h",
        "//src/mongo/db/storage:backup_cursor_hooks.h",
        "//src/mongo/db/storage:backup_cursor_state.h",
        "//src/mongo/db/storage:bson_collection_catalog_entry.h",
        "//src/mongo/db/storage:duplicate_key_error_info.h",
        "//src/mongo/db/storage:durable_catalog_entry.h",
        "//src/mongo/db/storage:index_entry_comparison.h",
        "//src/mongo/db/storage:sorted_data_interface.h",
        "//src/mongo/db/storage:storage_engine_init.h",
        "//src/mongo/db/timeseries:timeseries_global_options.h",
        "//src/mongo/db/update:document_diff_applier.h",
        "//src/mongo/db/update:document_diff_serialization.h",
        "//src/mongo/db/update:pattern_cmp.h",
        "//src/mongo/db/views:view.h",
        "//src/mongo/executor:connection_metrics.h",
        "//src/mongo/executor:remote_command_request.h",
        "//src/mongo/executor:remote_command_response.h",
        "//src/mongo/executor:task_executor.h",
        "//src/mongo/idl:generic_argument.h",
        "//src/mongo/idl:generic_argument_gen",
        "//src/mongo/rpc:get_status_from_command_result.h",
        "//src/mongo/rpc:metadata.h",
        "//src/mongo/rpc:object_check.h",
        "//src/mongo/rpc:protocol.h",
        "//src/mongo/rpc:reply_builder_interface.h",
        "//src/mongo/rpc:reply_interface.h",
        "//src/mongo/rpc:topology_version_gen",
        "//src/mongo/rpc:unique_message.h",
        "//src/mongo/rpc/metadata:impersonated_user_metadata_gen",
        "//src/mongo/rpc/metadata:oplog_query_metadata.h",
        "//src/mongo/s:chunk.h",
        "//src/mongo/s:chunk_manager.h",
        "//src/mongo/s:chunk_version.h",
        "//src/mongo/s:database_version.h",
        "//src/mongo/s:database_version_base_gen",
        "//src/mongo/s:index_version.h",
        "//src/mongo/s:shard_key_pattern.h",
        "//src/mongo/s:shard_version.h",
        "//src/mongo/s:stale_exception.h",
        "//src/mongo/s:type_collection_common_types_gen",
        "//src/mongo/s/catalog:type_chunk.h",
        "//src/mongo/s/catalog:type_chunk_base_gen",
        "//src/mongo/s/catalog:type_chunk_range.h",
        "//src/mongo/s/catalog:type_chunk_range_base_gen",
        "//src/mongo/s/resharding:type_collection_fields_gen",
        "//src/mongo/scripting:engine.h",
        "//src/mongo/transport:baton.h",
        "//src/mongo/transport:message_compressor_base.h",
        "//src/mongo/transport:message_compressor_manager.h",
        "//src/mongo/transport:service_executor.h",
        "//src/mongo/transport:ssl_connection_context.h",
        "//src/mongo/transport:transport_layer.h",
        "//src/mongo/util:invalidating_lru_cache.h",
        "//src/mongo/util:lazily_initialized.h",
        "//src/mongo/util:lru_cache.h",
        "//src/mongo/util:pcre.h",
        "//src/mongo/util:read_through_cache.h",
        "//src/mongo/util:represent_as.h",
        "//src/mongo/util/concurrency:notification.h",
        "//src/mongo/util/concurrency:thread_pool_interface.h",
        "//src/mongo/util/net:sock.h",
        "//src/mongo/util/net:ssl_manager.h",
        "//src/mongo/util/net:ssl_options.h",
        "//src/mongo/util/net/ssl:apple.hpp",
    ],
)

# Necessary if used in cc_test since it doesn't have a hdrs field
# and will try to compile idl gen files in the core_headers filegroup.
mongo_cc_library(
    name = "core_headers_library",
    hdrs = ["core_headers"],
)
